home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
pcl
/
src-16f.lha
/
ldb
/
Makefile.orig
< prev
next >
Wrap
Makefile
|
1992-04-03
|
3KB
|
154 lines
/* $Header: Makefile.orig,v 1.29 92/03/06 12:39:06 wlott Exp $ */
INCLS = -I. -I/usr/misc/.X11/include
SRCS = ldb.c egets.c coreparse.c alloc.c monitor.c print.c \
os.c os-common.c arch.c vars.c assem.s parse.c interrupt.c test.c \
search.c validate.c gc.c globals.c dynbind.c breakpoint.c \
regnames.c backtrace.c bitbash.c save.c purify.c socket.c
OBJS = ldb.o egets.o coreparse.o alloc.o monitor.o print.o \
os.o os-common.o arch.o vars.o assem.o parse.o interrupt.o test.o \
search.o validate.o gc.o globals.o dynbind.o breakpoint.o \
regnames.o backtrace.o bitbash.o save.o purify.o socket.o
#ifdef mips
CFLAGS = -O ${INCLS}
UNDEFSYMPATTERN=&
ASSEMFILE='mips-assem.s'
ARCH_SRC="mips-arch.c"
#endif
#ifdef ibmrt
CFLAGS = -g ${INCLS}
UNDEFSYMPATTERN=_&
ASSEMFILE='rt-assem.s'
ARCH_SRC="rt-arch.c"
#endif
#ifdef sparc
CFLAGS = -O ${INCLS}
UNDEFSYMPATTERN=_&
ASSEMFILE='sparc-assem.s'
ARCH_SRC="sparc-arch.c"
#endif
#ifdef MACH
OS_SRC=mach-os.c
OS_LINK_FLAGS=
OS_SRCS=
OS_OBJS=
OS_LIBS=-lmach
CPP=/usr/cs/lib/cpp
#else
#ifdef sun
OS_SRC=sunos-os.c
OS_LINK_FLAGS=-Bstatic
OS_SRCS=fake-mach.c
OS_OBJS=fake-mach.o
OS_LIBS=
#endif
CPP=/lib/cpp
#endif
all: ldb.map
ldb.map: ldb
echo -n 'Map file for ldb version ' > ldb.map
cat version >> ldb.map
nm -gp ldb >> ldb.map
ldb: ${OBJS} ${OS_OBJS} version undefineds
echo -n '1 + ' | cat - version | bc > ,version
mv ,version version
cc ${CFLAGS} -DVERSION=`cat version` -c version.c
cc ${OS_LINK_FLAGS} `cat undefineds` -o ,ldb \
${OBJS} ${OS_OBJS} version.o \
${OS_LIBS} -lm -lc
mv -f ,ldb ldb
version:
echo 0 > version
undefineds: undefineds.src
${CPP} undefineds.src | \
sed -e '/^#/d' -e '/^[ ]*$$/d' -e 's/.*/-u ${UNDEFSYMPATTERN}/' | \
sort -u > ,undefineds
mv ,undefineds undefineds
assem.s:
rm -f assem.s
ln -s ${ASSEMFILE} assem.s
os.c:
rm -f os.c
ln -s ${OS_SRC} os.c
arch.c:
rm -f arch.c
ln -s ${ARCH_SRC} arch.c
#ifdef mips
/* MIPS specific stuff. */
/* If we get an interrupt while in lisp code, the global pointer */
/* is trash. Therefore, we can't use the GP relative addressing */
/* mode in the interrupt handlers. */
arch.o: arch.c
cc ${CFLAGS} -G 0 -c arch.c
interrupt.o: interrupt.c
cc ${CFLAGS} -G 0 -c interrupt.c
assem.o: assem.s lisp.h lispregs.h globals.h
as -G 0 -o $@ assem.s
#endif
#ifdef ibmrt
assem.o: assem.s
${CPP} assem.s | as -o assem.o
#endif
#ifdef sparc
/* We need this shit because as runs the wrong preprocessor. */
#ifdef MACH
ASSEMDEFS=-DMACH
#else
ASSEMDEFS=-UMACH
#endif
assem.o: assem.s lisp.h lispregs.h globals.h
as -P ${ASSEMDEFS} -o $@ assem.s
#endif
socket.o: socket.c
cc ${CFLAGS} -DUNIXCONN -c socket.c
lisp.h:
@echo "You must run genesis to create lisp.h!"
@false
clean:
rm -f lisp.h os.c arch.c assem.s undefineds *.o ldb ldb.map
depend: depends
depends: os.c arch.c assem.s
rm -f Makefile.BAK
ln Makefile Makefile.BAK
sed -n '1,/^\/\*@/p' Makefile > Makefile.NEW
cc -M ${INCLS} ${SRCS} ${OS_SRCS} | egrep -v ' /usr/' >> Makefile.NEW
mv Makefile.NEW Makefile
rm Makefile.BAK
/*@ Do not edit anything after this line. */